<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8"> </head>
<body>
<!--注意，enctype 一定要设置为 multipart/form-data-->
<form action="index" method="post" enctype="multipart/form-data">
    <table style="width:400px;height: 130px;border-collapse: collapse;margin: 20px auto;">
        <tr>
            <td> 商品名：</td>
            <td><input type="text" name="gname" /></td>
        </tr>
        <tr>
            <td> 上传图片：</td>
            <td><input type="file" name="img" /></td>
        </tr>
        <tr>
            <td colspan="2"><input type="submit" value="提交" />
                <a href="http://localhost/task_3/www.jsdaima.com/ThinkPHP_V5.1.39/public/index.php/index/index/lst">查看列表</a></td>
        </tr>
    </table>
</form>
</body>
</html>